3.6 \(\int \frac{1}{(a+b x^n+c x^{2 n})^2} \, dx\)

Optimal. Leaf size=283 \[ -\frac{c x \left (-b (1-n) \sqrt{b^2-4 a c}+4 a c (1-2 n)+b^2 (-(1-n))\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (-b \sqrt{b^2-4 a c}-4 a c+b^2\right )}-\frac{c x \left (b (1-n) \sqrt{b^2-4 a c}+4 a c (1-2 n)+b^2 (-(1-n))\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (b \sqrt{b^2-4 a c}-4 a c+b^2\right )}+\frac{x \left (-2 a c+b^2+b c x^n\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )} \]

[Out]

(x*(b^2 - 2*a*c + b*c*x^n))/(a*(b^2 - 4*a*c)*n*(a + b*x^n + c*x^(2*n))) - (c*(4*a*c*(1 - 2*n) - b^2*(1 - n) -
b*Sqrt[b^2 - 4*a*c]*(1 - n))*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(
a*(b^2 - 4*a*c)*(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])*n) - (c*(4*a*c*(1 - 2*n) - b^2*(1 - n) + b*Sqrt[b^2 - 4*a*
c]*(1 - n))*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(a*(b^2 - 4*a*c)*(
b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c])*n)

________________________________________________________________________________________

Rubi [A]  time = 0.385304, antiderivative size = 283, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {1345, 1422, 245} \[ -\frac{c x \left (-b (1-n) \sqrt{b^2-4 a c}+4 a c (1-2 n)+b^2 (-(1-n))\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (-b \sqrt{b^2-4 a c}-4 a c+b^2\right )}-\frac{c x \left (b (1-n) \sqrt{b^2-4 a c}+4 a c (1-2 n)+b^2 (-(1-n))\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (b \sqrt{b^2-4 a c}-4 a c+b^2\right )}+\frac{x \left (-2 a c+b^2+b c x^n\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n + c*x^(2*n))^(-2),x]

[Out]

(x*(b^2 - 2*a*c + b*c*x^n))/(a*(b^2 - 4*a*c)*n*(a + b*x^n + c*x^(2*n))) - (c*(4*a*c*(1 - 2*n) - b^2*(1 - n) -
b*Sqrt[b^2 - 4*a*c]*(1 - n))*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(
a*(b^2 - 4*a*c)*(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])*n) - (c*(4*a*c*(1 - 2*n) - b^2*(1 - n) + b*Sqrt[b^2 - 4*a*
c]*(1 - n))*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(a*(b^2 - 4*a*c)*(
b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c])*n)

Rule 1345

Int[((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[(x*(b^2 - 2*a*c + b*c*x^n)*(a + b*x^
n + c*x^(2*n))^(p + 1))/(a*n*(p + 1)*(b^2 - 4*a*c)), x] + Dist[1/(a*n*(p + 1)*(b^2 - 4*a*c)), Int[(b^2 - 2*a*c
 + n*(p + 1)*(b^2 - 4*a*c) + b*c*(n*(2*p + 3) + 1)*x^n)*(a + b*x^n + c*x^(2*n))^(p + 1), x], x] /; FreeQ[{a, b
, c, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && ILtQ[p, -1]

Rule 1422

Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*
c, 2]}, Dist[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^n), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), In
t[1/(b/2 + q/2 + c*x^n), x], x]] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ
[c*d^2 - b*d*e + a*e^2, 0] && (PosQ[b^2 - 4*a*c] ||  !IGtQ[n/2, 0])

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \frac{1}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx &=\frac{x \left (b^2-2 a c+b c x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac{\int \frac{b^2-2 a c-\left (b^2-4 a c\right ) n+b c (1-n) x^n}{a+b x^n+c x^{2 n}} \, dx}{a \left (b^2-4 a c\right ) n}\\ &=\frac{x \left (b^2-2 a c+b c x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}+\frac{\left (c \left (4 a c (1-2 n)-b^2 (1-n)-b \sqrt{b^2-4 a c} (1-n)\right )\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 a \left (b^2-4 a c\right )^{3/2} n}-\frac{\left (c \left (4 a c (1-2 n)-b^2 (1-n)+b \sqrt{b^2-4 a c} (1-n)\right )\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 a \left (b^2-4 a c\right )^{3/2} n}\\ &=\frac{x \left (b^2-2 a c+b c x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}+\frac{c \left (4 a c (1-2 n)-b^2 (1-n)-b \sqrt{b^2-4 a c} (1-n)\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{a \left (b^2-4 a c\right )^{3/2} \left (b-\sqrt{b^2-4 a c}\right ) n}-\frac{c \left (4 a c (1-2 n)-b^2 (1-n)+b \sqrt{b^2-4 a c} (1-n)\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{a \left (b^2-4 a c\right )^{3/2} \left (b+\sqrt{b^2-4 a c}\right ) n}\\ \end{align*}

Mathematica [B]  time = 0.98965, size = 946, normalized size = 3.34 \[ -\frac{x \left (-2 b c^2 \sqrt{b^2-4 a c} n \left (\left (c x^n+b\right ) x^n+a\right ) \left (\left (b-\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,1+\frac{1}{n};2+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )-\left (b+\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,1+\frac{1}{n};2+\frac{1}{n};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right ) x^n+2 b c^2 \sqrt{b^2-4 a c} \left (\left (c x^n+b\right ) x^n+a\right ) \left (\left (b-\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,1+\frac{1}{n};2+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )-\left (b+\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,1+\frac{1}{n};2+\frac{1}{n};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right ) x^n-\left (b^2-4 a c\right ) \left (\sqrt{b^2-4 a c}-b\right ) \left (b+\sqrt{b^2-4 a c}\right ) (n+1) \left (b c x^n+b^2-2 a c\right )+8 a c^2 \sqrt{b^2-4 a c} n (n+1) \left (\left (c x^n+b\right ) x^n+a\right ) \left (\left (b-\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )-\left (b+\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right )-2 b^2 c \sqrt{b^2-4 a c} n (n+1) \left (\left (c x^n+b\right ) x^n+a\right ) \left (\left (b-\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )-\left (b+\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right )-4 a c^2 \sqrt{b^2-4 a c} (n+1) \left (\left (c x^n+b\right ) x^n+a\right ) \left (\left (b-\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )-\left (b+\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right )+2 b^2 c \sqrt{b^2-4 a c} (n+1) \left (\left (c x^n+b\right ) x^n+a\right ) \left (\left (b-\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )-\left (b+\sqrt{b^2-4 a c}\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )\right )\right )}{a \left (b^2-4 a c\right )^2 \left (\sqrt{b^2-4 a c}-b\right ) \left (b+\sqrt{b^2-4 a c}\right ) n (n+1) \left (\left (c x^n+b\right ) x^n+a\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n + c*x^(2*n))^(-2),x]

[Out]

-((x*(-((b^2 - 4*a*c)*(-b + Sqrt[b^2 - 4*a*c])*(b + Sqrt[b^2 - 4*a*c])*(1 + n)*(b^2 - 2*a*c + b*c*x^n)) + 2*b*
c^2*Sqrt[b^2 - 4*a*c]*x^n*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2
+ n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 +
n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) - 2*b*c^2*Sqrt[b^2 - 4*a*c]*n*x^n*(a + x^n*(b + c*x^n))*(-((b + S
qrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqr
t[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) + 2*b^2*c*Sq
rt[b^2 - 4*a*c]*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-
1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-
2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) - 4*a*c^2*Sqrt[b^2 - 4*a*c]*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2
- 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*
c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) - 2*b^2*c*Sqrt[b^2 - 4*a*c]*
n*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/
(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b +
Sqrt[b^2 - 4*a*c])]) + 8*a*c^2*Sqrt[b^2 - 4*a*c]*n*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hy
pergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeo
metric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])))/(a*(b^2 - 4*a*c)^2*(-b + Sqrt[b^2 - 4*
a*c])*(b + Sqrt[b^2 - 4*a*c])*n*(1 + n)*(a + x^n*(b + c*x^n))))

________________________________________________________________________________________

Maple [F]  time = 0.062, size = 0, normalized size = 0. \begin{align*} \int \left ( a+b{x}^{n}+c{x}^{2\,n} \right ) ^{-2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*x^n+c*x^(2*n))^2,x)

[Out]

int(1/(a+b*x^n+c*x^(2*n))^2,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{b c x x^{n} +{\left (b^{2} - 2 \, a c\right )} x}{a^{2} b^{2} n - 4 \, a^{3} c n +{\left (a b^{2} c n - 4 \, a^{2} c^{2} n\right )} x^{2 \, n} +{\left (a b^{3} n - 4 \, a^{2} b c n\right )} x^{n}} - \int -\frac{b c{\left (n - 1\right )} x^{n} - 2 \, a c{\left (2 \, n - 1\right )} + b^{2}{\left (n - 1\right )}}{a^{2} b^{2} n - 4 \, a^{3} c n +{\left (a b^{2} c n - 4 \, a^{2} c^{2} n\right )} x^{2 \, n} +{\left (a b^{3} n - 4 \, a^{2} b c n\right )} x^{n}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*x^n+c*x^(2*n))^2,x, algorithm="maxima")

[Out]

(b*c*x*x^n + (b^2 - 2*a*c)*x)/(a^2*b^2*n - 4*a^3*c*n + (a*b^2*c*n - 4*a^2*c^2*n)*x^(2*n) + (a*b^3*n - 4*a^2*b*
c*n)*x^n) - integrate(-(b*c*(n - 1)*x^n - 2*a*c*(2*n - 1) + b^2*(n - 1))/(a^2*b^2*n - 4*a^3*c*n + (a*b^2*c*n -
 4*a^2*c^2*n)*x^(2*n) + (a*b^3*n - 4*a^2*b*c*n)*x^n), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{1}{c^{2} x^{4 \, n} + b^{2} x^{2 \, n} + 2 \, a b x^{n} + a^{2} + 2 \,{\left (b c x^{n} + a c\right )} x^{2 \, n}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*x^n+c*x^(2*n))^2,x, algorithm="fricas")

[Out]

integral(1/(c^2*x^(4*n) + b^2*x^(2*n) + 2*a*b*x^n + a^2 + 2*(b*c*x^n + a*c)*x^(2*n)), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*x**n+c*x**(2*n))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*x^n+c*x^(2*n))^2,x, algorithm="giac")

[Out]

integrate((c*x^(2*n) + b*x^n + a)^(-2), x)